<template>
	<view class="app_title" :style="{backgroundColor:background}">
		<view class="top-nav-tab-group" :style="{backgroundColor:background,position:position}">
			<!-- <image v-if="showback == 1" mode="heightFix" class="top-nav-tab-img" src="/static/jibei/home/back.png"></image> -->
			<uni-icons @click="back()" :color="color" class="top-nav-tab-img" type="left" :size="26"></uni-icons>
			<text :style="{color:color}">{{title}}</text>
		</view>
	</view>
</template>

<script>
	export default {
		name: "top-back-navbar",
		props: {
			title: {
				type: String,
				default: ''
			},
			position: {
				type: String,
				default: 'relative'
			},
			background: {
				type: String,
				default: '#ffffff'
			},
			color: {
				type: String,
				default: '#000000'
			},
			showback: {
				type: Number,
				default: 1
			}
		},
		data() {
			return {}
		},
		mounted() {},
		methods: {
			back() {
				uni.navigateBack({
					delta: 1
				})
			}
		}
	}
</script>

<style lang="less">
	.top-nav-tab-group {
		width: 100%;
		height: 100rpx;
		top: 0;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 34rpx;
		box-sizing: border-box;
		z-index: 999;
		letter-spacing: 4rpx;
		padding-top: var(--status-bar-height);
		box-sizing: content-box;


		.fixed {
			position: fixed;
		}

		.top-nav-tab-img {
			position: absolute;
			left: 30rpx;
		}
	}
</style>